//
//  MTEmailViewController.h
//  YuchBox
//
//  Created by Ivan on 11-10-26.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MTRootToolBarViewController.h"
#import "MTEmailShowViewController.h"
#import "MTEmailShow6ViewController.h"

#import "IvanTabBar.h"
#import "IvanNavigationBar.h"
#import "DataSource.h"

#import "StateViewer.h"


@class MTEmailViewTableController;
@class MTEMailNavigationBar;
@class MTRootToolBarViewController;

@class MTEmailShow6ViewController;

@interface MTEmailViewController : UITableViewController <StateViewerDelegate, IvanTabBarDelegate>
{
    NSMutableArray *_emails;
    NSInteger       _emailsTotalCount;
    NSInteger       _emailsUnreadCount;
    NSInteger       _emailsLoadOffset;
    
    NSInteger       _selectRow;
}

@property (strong, nonatomic) MTEmailShow6ViewController *show6ViewController;
@property (strong, nonatomic) NSMutableArray            *emails;

@property (assign, nonatomic) NSInteger                 emailsTotalCount;

- (void)eventInvoke:(DataSourceEvent)eventCode info:(id)info;

//- (NSInteger)loadEmailsFromDB;
- (void)loadMoreEmail;
- (void)refreshAction:(id)sender;
- (void)setBarItems;
@end

